#ifndef SWANLINK_FINANCE_MAKECARD_SERVICES_ADAPTOR_SEAORY_INCLUDE_MAKECARD_BITMAP_H
#define SWANLINK_FINANCE_MAKECARD_SERVICES_ADAPTOR_SEAORY_INCLUDE_MAKECARD_BITMAP_H
#include <unistd.h>
#include "SeaoryPrinter.h"

#define MAKEWORD(a, b) ((uint16_t)(((uint8_t)(a)) | ((uint16_t)((uint8_t)(b))) << 8))
#define MAKELONG(a, b) ((uint32_t)(((uint16_t)(a)) | ((uint32_t)((uint16_t)(b))) << 16))


typedef struct tagRGBQUAD
{
    uint8_t rgbBlue;
    uint8_t rgbGreen;
    uint8_t rgbRed;
    uint8_t rgbReserved;
} RGBQUAD;

typedef struct tagBITMAPFILEHEADER
{
    uint16_t bfType;
    uint32_t bfSize;
    uint16_t bfReserved1;
    uint16_t bfReserved2;
    uint32_t bfOffBits;
} BITMAPFILEHEADER;

typedef struct tagBITMAPINFOHEADER
{
    uint32_t biSize;
    int32_t biWidth;
    int32_t biHeight;
    uint16_t biPlanes;
    uint16_t biBitCount;
    uint32_t biCompression;
    uint32_t biSizeImage;
    int32_t biXPelsPerMeter;
    int32_t biYPelsPerMeter;
    uint32_t biClrUsed;
    uint32_t biClrImportant;
} BITMAPINFOHEADER;

uint32_t  ReadBmpFile(char* szFileName, BITMAP* lpBmp);
void InitCardParam(PRINT_CARD_PARAM &JobPara);
void FreeCardParam(PRINT_CARD_PARAM &JobPara);
#endif  // SWANLINK_FINANCE_MAKECARD_SERVICES_ADAPTOR_SEAORY_INCLUDE_MAKECARD_BITMAP_H